package com.jdls.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author 嘉德罗斯
 * @date 2021/9/16
 */
@Configuration
public class SpringMvcSupport extends WebMvcConfigurationSupport {

//    @Override
//    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/pages/**")
//                .addResourceLocations("/pages/");
//        registry.addResourceHandler("/css/**")
//                .addResourceLocations("/css/");
//        registry.addResourceHandler("/js/**")
//                .addResourceLocations("/js/");
//        registry.addResourceHandler("/plugins/**")
//                .addResourceLocations("/plugins/");
//    }
    @Override
    protected void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
        //System.out.println("拦截器执行了嘛");
        //System.out.println("........");
    }
}
